import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * visitInfo模块-访问信息
 */
@Entity('visit_info')
export class VisitInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: 'UUID', length: 36 })
  uuid: string;

  @Index()
  @Column({ comment: '用户ID' })
  userId: number;

  @Column({ comment: '是否已安装 0-未安装 1-已安装', default: 0 })
  isInstalled: number;

  @Index()
  @Column({ comment: '应用ID' })
  appId: number;

  @Column({ comment: '来源 国家/地区', length: 50 })
  from: string;
}
